<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>演唱会管理页面</title>
    <link th:href="@{/css/admin/userManage.css}" rel="stylesheet"/>
</head>
<body>
<th:block th:insert="~{admin/header :: sidebar}"/>
<h1>演唱会管理</h1>

<div class="navigation-bar">
    <div class="nav-title">演唱会管理</div>
    <form class="action-bar" action="#" method="get">
        <a href="/admin/concert/addConcert" class="btn btn-success action-bar-item" >添加新演唱会</a>
        <button class="btn btn-primary action-bar-item" type="submit">立即查询</button>
        <input class="form-control action-bar-item search-input" name="nickname" type="text"
               placeholder="请输入演唱会名称">
        <input class="form-control action-bar-item search-input" name="number" type="text" placeholder="请输入艺人名称">
    </form>
</div>

<!-- 用户列表表格 -->
<table>
    <thead>
    <tr>
        <th>演唱会名称</th>
        <th>艺人</th>
        <th>演唱会日期</th>
        <th>演唱会时间</th>
        <th>演唱会地点</th>
        <th>演唱会图片</th>
        <th>演唱会简介</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <!-- 这里可以使用Thymeleaf的循环指令来动态填充用户数据，假设从后端传递过来一个名为users的用户列表对象 -->
    <tr th:each="concert : ${userL.list}">
        <td th:text="${concert.concertname}"></td>
        <td th:text="${concert.artist}"></td>
        <td th:text="${#dates.format(concert.concertdate, 'yyyy-MM-dd')}"></td>
        <td th:text="${#dates.format(concert.concerttime, 'HH:mm:ss')}"></td>
        <td th:text="${concert.venue}"></td>
        <td><div><img th:width="50" th:height="50" th:src="${concert.concertImg}" class="type-image"/></div></td>
        <td th:text="${concert.introduction}"></td>
        <td>
            <a href="admin/concert/deleteConcert" th:href="@{'deleteConcert?id=' + ${concert.getConcertid()}}">删除演唱会</a>
            <a href="admin/concert/editConcert" th:href="@{'editConcert?id=' + ${concert.getConcertid()}}">修改演唱会信息</a>
        </td>
    </tr>
    </tbody>
</table>
<div th:replace="admin/common/console-common :: common_pager(${userL})"></div>
</body>
</html>